import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '来源名称',
    align: "center",
    dataIndex: 'sourceName'
  },
  {
    title: '来源域名',
    align: "center",
    dataIndex: 'sourceDomain'
  },
  {
    title: '来源URL',
    align: "center",
    dataIndex: 'sourceUrl'
  },
  {
    title: '新闻分类',
    align: "center",
    dataIndex: 'sourceType_dictText'
  },
  {
    title: '状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
  {
    title: '作者',
    align: "center",
    dataIndex: 'author'
  },
  {
    title: '新闻标题',
    align: "center",
    dataIndex: 'title'
  },
  {
    title: '图片URL',
    align: "center",
    dataIndex: 'picture',
    customRender: render.renderImage,
  },
  {
    title: '新闻内容',
    align: "center",
    dataIndex: 'content',
  },
];

// 高级查询数据
export const superQuerySchema = {
  sourceName: {title: '来源名称',order: 0,view: 'text', type: 'string',},
  sourceDomain: {title: '来源域名',order: 1,view: 'text', type: 'string',},
  sourceUrl: {title: '来源URL',order: 2,view: 'text', type: 'string',},
  sourceType: {title: '新闻分类',order: 3,view: 'number', type: 'number',dictCode: 'category_type',},
  status: {title: '状态',order: 4,view: 'number', type: 'number',dictCode: 'category_status',},
  author: {title: '作者',order: 5,view: 'text', type: 'string',},
  title: {title: '新闻标题',order: 6,view: 'text', type: 'string',},
  picture: {title: '图片URL',order: 7,view: 'image', type: 'string',},
  content: {title: '新闻内容',order: 8,view: 'umeditor', type: 'string',},
};
